Optimal. Leaf size=82 \[ \frac {(e+f x)^3}{3 a f}-\frac {2 i f^2 \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {2 i f (e+f x) \sinh (c+d x)}{a d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {5682, 32, 3377,
2718} \begin {gather*} -\frac {2 i f^2 \cosh (c+d x)}{a d^3}+\frac {2 i f (e+f x) \sinh (c+d x)}{a d^2}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {(e+f x)^3}{3 a f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2718
Rule 3377
Rule 5682
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i \int (e+f x)^2 \sinh (c+d x) \, dx}{a}+\frac {\int (e+f x)^2 \, dx}{a}\\ &=\frac {(e+f x)^3}{3 a f}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {(2 i f) \int (e+f x) \cosh (c+d x) \, dx}{a d}\\ &=\frac {(e+f x)^3}{3 a f}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {2 i f (e+f x) \sinh (c+d x)}{a d^2}-\frac {\left (2 i f^2\right ) \int \sinh (c+d x) \, dx}{a d^2}\\ &=\frac {(e+f x)^3}{3 a f}-\frac {2 i f^2 \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {2 i f (e+f x) \sinh (c+d x)}{a d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.27, size = 78, normalized size = 0.95 \begin {gather*} \frac {d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )-3 i \left (2 f^2+d^2 (e+f x)^2\right ) \cosh (c+d x)+6 i d f (e+f x) \sinh (c+d x)}{3 a d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 222 vs. \(2 (77 ) = 154\).
time = 1.10, size = 223, normalized size = 2.72
method | result | size |
risch | \(\frac {f^{2} x^{3}}{3 a}+\frac {f e \,x^{2}}{a}+\frac {e^{2} x}{a}+\frac {e^{3}}{3 a f}-\frac {i \left (f^{2} x^{2} d^{2}+2 d^{2} e f x +d^{2} e^{2}-2 d \,f^{2} x -2 d e f +2 f^{2}\right ) {\mathrm e}^{d x +c}}{2 a \,d^{3}}-\frac {i \left (f^{2} x^{2} d^{2}+2 d^{2} e f x +d^{2} e^{2}+2 d \,f^{2} x +2 d e f +2 f^{2}\right ) {\mathrm e}^{-d x -c}}{2 a \,d^{3}}\) | \(160\) |
derivativedivides | \(-\frac {i c^{2} f^{2} \cosh \left (d x +c \right )-2 i f c e d \cosh \left (d x +c \right )-2 i c \,f^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i e^{2} d^{2} \cosh \left (d x +c \right )+2 i f e d \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{2} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 f c e d \left (d x +c \right )+c \,f^{2} \left (d x +c \right )^{2}-e^{2} d^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) | \(223\) |
default | \(-\frac {i c^{2} f^{2} \cosh \left (d x +c \right )-2 i f c e d \cosh \left (d x +c \right )-2 i c \,f^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i e^{2} d^{2} \cosh \left (d x +c \right )+2 i f e d \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{2} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 f c e d \left (d x +c \right )+c \,f^{2} \left (d x +c \right )^{2}-e^{2} d^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) | \(223\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 270 vs. \(2 (77) = 154\).
time = 0.37, size = 270, normalized size = 3.29 \begin {gather*} f {\left (\frac {2 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} - \frac {i \, d^{2} x^{2} e^{c} + i \, d x e^{c} - {\left (-i \, d x e^{\left (3 \, c\right )} + i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} - {\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + {\left (d x + 1\right )} e^{\left (-d x\right )} + i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}}\right )} e + \frac {1}{2} \, {\left (\frac {2 \, {\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (-d x - c\right )}}{a d}\right )} e^{2} + \frac {{\left (2 \, d^{3} x^{3} e^{c} + 3 \, {\left (-i \, d^{2} x^{2} e^{\left (2 \, c\right )} + 2 i \, d x e^{\left (2 \, c\right )} - 2 i \, e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + 3 \, {\left (-i \, d^{2} x^{2} - 2 i \, d x - 2 i\right )} e^{\left (-d x\right )}\right )} f^{2} e^{\left (-c\right )}}{6 \, a d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 160 vs. \(2 (77) = 154\).
time = 0.35, size = 160, normalized size = 1.95 \begin {gather*} \frac {{\left (-3 i \, d^{2} f^{2} x^{2} - 6 i \, d f^{2} x - 3 i \, d^{2} e^{2} - 6 i \, f^{2} - 6 \, {\left (i \, d^{2} f x + i \, d f\right )} e - 3 \, {\left (i \, d^{2} f^{2} x^{2} - 2 i \, d f^{2} x + i \, d^{2} e^{2} + 2 i \, f^{2} + 2 \, {\left (i \, d^{2} f x - i \, d f\right )} e\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d^{3} f^{2} x^{3} + 3 \, d^{3} f x^{2} e + 3 \, d^{3} x e^{2}\right )} e^{\left (d x + c\right )}\right )} e^{\left (-d x - c\right )}}{6 \, a d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.30, size = 318, normalized size = 3.88 \begin {gather*} \begin {cases} \frac {\left (\left (- 2 i a d^{5} e^{2} - 4 i a d^{5} e f x - 2 i a d^{5} f^{2} x^{2} - 4 i a d^{4} e f - 4 i a d^{4} f^{2} x - 4 i a d^{3} f^{2}\right ) e^{- d x} + \left (- 2 i a d^{5} e^{2} e^{2 c} - 4 i a d^{5} e f x e^{2 c} - 2 i a d^{5} f^{2} x^{2} e^{2 c} + 4 i a d^{4} e f e^{2 c} + 4 i a d^{4} f^{2} x e^{2 c} - 4 i a d^{3} f^{2} e^{2 c}\right ) e^{d x}\right ) e^{- c}}{4 a^{2} d^{6}} & \text {for}\: a^{2} d^{6} e^{c} \neq 0 \\\frac {x^{3} \left (- i f^{2} e^{2 c} + i f^{2}\right ) e^{- c}}{6 a} + \frac {x^{2} \left (- i e f e^{2 c} + i e f\right ) e^{- c}}{2 a} + \frac {x \left (- i e^{2} e^{2 c} + i e^{2}\right ) e^{- c}}{2 a} & \text {otherwise} \end {cases} + \frac {e^{2} x}{a} + \frac {e f x^{2}}{a} + \frac {f^{2} x^{3}}{3 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 208 vs. \(2 (74) = 148\).
time = 0.46, size = 208, normalized size = 2.54 \begin {gather*} \frac {{\left (2 \, d^{3} f^{2} x^{3} e^{\left (d x + c\right )} + 6 \, d^{3} e f x^{2} e^{\left (d x + c\right )} - 3 i \, d^{2} f^{2} x^{2} e^{\left (2 \, d x + 2 \, c\right )} + 6 \, d^{3} e^{2} x e^{\left (d x + c\right )} - 3 i \, d^{2} f^{2} x^{2} - 6 i \, d^{2} e f x e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d^{2} e f x - 3 i \, d^{2} e^{2} e^{\left (2 \, d x + 2 \, c\right )} + 6 i \, d f^{2} x e^{\left (2 \, d x + 2 \, c\right )} - 3 i \, d^{2} e^{2} - 6 i \, d f^{2} x + 6 i \, d e f e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d e f - 6 i \, f^{2} e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, f^{2}\right )} e^{\left (-d x - c\right )}}{6 \, a d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.52, size = 167, normalized size = 2.04 \begin {gather*} \frac {e^2\,x}{a}-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {\left (d^2\,e^2+2\,d\,e\,f+2\,f^2\right )\,1{}\mathrm {i}}{2\,a\,d^3}+\frac {f^2\,x^2\,1{}\mathrm {i}}{2\,a\,d}+\frac {f\,x\,\left (f+d\,e\right )\,1{}\mathrm {i}}{a\,d^2}\right )-{\mathrm {e}}^{c+d\,x}\,\left (\frac {\left (d^2\,e^2-2\,d\,e\,f+2\,f^2\right )\,1{}\mathrm {i}}{2\,a\,d^3}+\frac {f^2\,x^2\,1{}\mathrm {i}}{2\,a\,d}-\frac {f\,x\,\left (f-d\,e\right )\,1{}\mathrm {i}}{a\,d^2}\right )+\frac {f^2\,x^3}{3\,a}+\frac {e\,f\,x^2}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________